package com.sd;

public class Qipan {

	int maxX;//棋盘最大x
	int maxY;
	
	
	Point[][] points;  //存 Point 对象数组
	
	public void init() {
		maxX = 15;
		maxY = 15;
		
		points = new Point[maxX][maxY];
		
		Point point1 = new Point();
		point1.color = 1;
		points[0][1] = point1;
		
		Point point2 = new Point();
		point2.color = 2;
		points[0][2] = point2;
		
		
	}
	
	
	//绘制棋盘
	public void paint() {
		
		for (int i = 0; i < points.length; i++) {
			
//			Point[] row = points[i];
			for (int j = 0; j < points[i].length; j++) {
//				Point p = row[j];
				Point p = points[i][j];//某个point对象
				
				//绘制点
				if (p == null) {
					Point qpPoint = new Point();
//					points[i][j] = qpPoint;
					qpPoint.paint();
				}else {
					p.paint();
				}
				
			}
			System.out.println();
		}
		
	}
}
